package korwin;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.imageio.ImageIO;

public class ExplodingBarrel extends Enemy {
    
    ExplodingBarrel() {
        try {
	        // Load images for barrel
	    	URL barrelImgUrl = this.getClass().getResource("/korwin/resources/images/barrel.png");
	        bodyImg = ImageIO.read(barrelImgUrl);
        }
        catch (IOException ex) 
        {
            Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
    
    public void Initialize(int xCoordinate, int yCoordinate)
    {
        health = 1;
        
        // Sets enemy position.
        this.xCoordinate = xCoordinate;
        this.yCoordinate = yCoordinate;
       
        movingXspeed = -0.5;
        movingYspeed = 1;
    }
    	
   
    
    /**
     * It sets speed and time between enemies to the initial properties.
     */
//    public static void restartEnemy(){
//        EnemyBarrel.timeBetweenNewEnemies = timeBetweenNewEnemiesInit;
//        EnemyBarrel.timeOfLastCreatedEnemy = 0;
//    }
//    
    
    /**
     * It increase enemy speed and decrease time between new enemies.
     */
//    public static void speedUp(){
//        if(EnemyBarrel.timeBetweenNewEnemies > Framework.secInNanosec)
//            EnemyBarrel.timeBetweenNewEnemies -= Framework.secInNanosec / 100;
//        
//        EnemyBarrel.movingYspeed += 0.25;
//    }
}
